package com.daxidi.cn.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 会员表
 * </p>
 *
 * @author wsh
 * @since 2020-11-09
 */
@ApiModel("会员表")
@Data
@EqualsAndHashCode(callSuper = false)
public class Member implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 会员id
     */
    @Excel(name = "会员id")
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("会员id")
    private Long id;

    /**
     * 会员名称
     */
    @Excel(name = "会员名称")
    @ApiModelProperty("会员名称")
    private String name;

    /**
     * 会员手机号
     */
    @Excel(name = "会员手机号")

    @ApiModelProperty("会员手机号")
    private String mobile;

    /**
     * 会员码 系统生成，或者导入
     */
    @Excel(name = "会员码")
    @ApiModelProperty("会员码 系统生成，或者导入")
    private String code;

    /**
     * 身份证
     */
    @Excel(name = "身份证")
    @ApiModelProperty("身份证")
    private String idCard;

    @Excel(name = "是否注销",replace = {"正常_1","已注销_0"})
    @ApiModelProperty("0 注销 1 正常")
    private Integer enable;

    /**
     * 单位名称
     */
    @Excel(name = "单位名称")
    @ApiModelProperty("单位名称")
    private String unit;

    @Excel(name = "创建时间",exportFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date createdAt;

    @Excel(name = "修改时间",exportFormat = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("修改时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updatedAt;

    @Excel(name = "删除时间",exportFormat = "yyyy-MM-dd HH:mm:ss")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("删除时间")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date deletedAt;

    @JSONField(serialize = false)
    @Excel(name = "会员密码")
    @ApiModelProperty("会员密码")
    private String password;


}
